Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UART framing API #24335

Closed
wants to merge 6 commits into from
Closed

UART framing API #24335

wants to merge 6 commits into from

Conversation

andyp1per
Copy link
Collaborator

This implements a UART framing API and uses it in our CRSF protocol implementation.

Flown briefly using CRSF tracer on a 3" quad.

Copy link
Contributor

@tridge tridge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where is the metadata that tells us how long each frame is?

libraries/AP_HAL/UARTDriver.h Outdated Show resolved Hide resolved
libraries/AP_HAL/UARTDriver.h Outdated Show resolved Hide resolved
libraries/AP_HAL_ChibiOS/UARTDriver.h Outdated Show resolved Hide resolved
libraries/AP_HAL_ChibiOS/UARTDriver.cpp Outdated Show resolved Hide resolved
libraries/AP_HAL_ChibiOS/UARTDriver.cpp Outdated Show resolved Hide resolved
@tridge tridge removed the DevCallEU label Jul 26, 2023
@andyp1per andyp1per requested a review from tridge August 23, 2023 20:16
@andyp1per andyp1per force-pushed the pr-uart-frame branch 2 times, most recently from 998fbfd to 75a666b Compare August 29, 2023 16:20
Copy link
Contributor

@tridge tridge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like to try a simpler version that only holds 1 frame, if a new frame arrives while we have a frame pending then we discard the old frame
I can't immediately think of a case where we need multi-frame, but if we do we could add that once this has settled in

libraries/AP_HAL/UARTDriver.cpp Outdated Show resolved Hide resolved
@tridge tridge removed the DevCallEU label Sep 27, 2023
@andyp1per andyp1per force-pushed the pr-uart-frame branch 2 times, most recently from 7f91b10 to e0d6b16 Compare February 1, 2024 13:54
…ate end of frames

ensure that DMA transfers triggered by IDLE line occur before framing
start and stop serial device when changing config
check sync byte for GHST and CRSF to avoid confusing the two protocols
do not change baudrate when scanning GHST protocol unless specifically configured
@andyp1per
Copy link
Collaborator Author

Now working with A/B variant and cleaned up. Actually found some subtle issues with CRSFv3 and IDLE frames. Flown briefly on my 3"

@andyp1per
Copy link
Collaborator Author

This turned out to have too many problems and doesn't actually work reliably on TBS kit

@andyp1per andyp1per closed this Feb 26, 2024
@andyp1per andyp1per deleted the pr-uart-frame branch February 26, 2024 09:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants